<template>
  <div>
    <el-button @click="dialogVisible = true"  type="primary">点 我</el-button>
    <el-dialog
      title="穿梭框"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose">
      <span>
        <eotransfer></eotransfer>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
    <el-button @click="tableVisible = true"  type="primary">点 我</el-button>
    <el-dialog
      title="数据表格"
      :visible.sync="tableVisible"
      width="50%"
      :before-close="handleClose">
      <span>
        <eotable></eotable>
      </span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="tableVisible = false">取 消</el-button>
        <el-button type="primary" @click="tableVisible = false">确 定</el-button>
      </span>
    </el-dialog>
    <el-button @click="getUserInfo"  type="primary">发送请求</el-button>
  </div>
</template>

<script>
import Eotransfer from './eotransfer'
import Eotable from '../data/eotable'
export default {
  name: 'alerttest',
  components: {Eotable, Eotransfer},
  data () {
    return {
      dialogVisible: false,
      tableVisible: false
    }
  },
  methods: {
    handleClose: function (done) {
      this.$confirm('确认关闭？')
        .then(_ => {
          done()
        }).catch(_ => {})
    },
    getUserInfo () {
      this.$axios({
        method: 'get',
        url: '/api/userserver/user/list',
        header: {
          Authorization: localStorage.getItem('yihong.Authorization')
        }
      }).then(function (resp) {
        console.log(resp)
      }).catch(function (err) {
        console.log(err)
      })
    }
  }
}
</script>

<style scoped>

</style>
